/*
 * @Author: wuyuxin
 * @Date: 2022-02-02 21:39:30
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-02-07 20:11:31
 * @Description: 
 */
// 设置响应头的中间件
module.exports = async (ctx, next) => {
  const contentType = 'application/json; charset=utf-8'
  ctx.set('Content-Type', contentType)
  ctx.set("Access-Control-Allow-Origin", "*")
  ctx.set("Access-Control-Allow-Methods", "OPTIONS, GET, PUT, POST, DELETE")
  await next()
}